package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：店铺商品分类和商品列表
 * 作者：xiaoxing on 17/4/11 08:16
 * 邮箱：2235445233@qq.com
 */
public class ShopProduct {


    /**
     * code : 200
     * msg : success
     * data : [{"type_id":"196","type_name":"面霜","type_logo":"http://bc.bvhao.cc/Uploads/2017-04-10/58eb83aaa3260.png","goods_list":[{"product_id":"1614","product_name":"保湿面霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f0454a40e8b.jpg","buy_numbers":"0","price":"11.00","reviews":"100"}]},{"type_id":"70","type_name":"米线","type_logo":"http://bc.bvhao.cc/Uploads/2017-03-18/58ccdfd8bd908.jpg","goods_list":[{"product_id":"1626","product_name":"晚霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f045a969656.jpg","buy_numbers":"0","price":"15.00","reviews":"100"}]},{"type_id":"49","type_name":"化妆品","type_logo":"http://bc.bvhao.cc/Uploads/2017-04-05/58e45665e570c.jpg","goods_list":[{"product_id":"1706","product_name":"香水","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f04517af294.jpg","buy_numbers":"0","price":"5.00","reviews":"100"},{"product_id":"1707","product_name":"口红","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f044fe9966e.jpg","buy_numbers":"0","price":"6.00","reviews":"100"}]}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public ShopProduct(String json) {
        ShopProduct result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * type_id : 196
         * type_name : 面霜
         * type_logo : http://bc.bvhao.cc/Uploads/2017-04-10/58eb83aaa3260.png
         * goods_list : [{"product_id":"1614","product_name":"保湿面霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f0454a40e8b.jpg","buy_numbers":"0","price":"11.00","reviews":"100"}]
         */

        private String type_id;
        private String type_name;
        private String type_logo;
        private List<GoodsListBean> goods_list;

        public String getType_id() {
            return type_id;
        }

        public void setType_id(String type_id) {
            this.type_id = type_id;
        }

        public String getType_name() {
            return type_name;
        }

        public void setType_name(String type_name) {
            this.type_name = type_name;
        }

        public String getType_logo() {
            return type_logo;
        }

        public void setType_logo(String type_logo) {
            this.type_logo = type_logo;
        }

        public List<GoodsListBean> getGoods_list() {
            return goods_list;
        }

        public void setGoods_list(List<GoodsListBean> goods_list) {
            this.goods_list = goods_list;
        }

        public static class GoodsListBean {
            /**
             * product_id : 1614
             * product_name : 保湿面霜
             * product_pic1 : http://bc.bvhao.cc/Uploads/2017-04-14/58f0454a40e8b.jpg
             * buy_numbers : 0
             * price : 11.00
             * reviews : 100
             */

            private String product_id;
            private String product_name;
            private String product_pic1;
            private String buy_numbers;
            private String price;
            private String reviews;

            public String getProduct_id() {
                return product_id;
            }

            public void setProduct_id(String product_id) {
                this.product_id = product_id;
            }

            public String getProduct_name() {
                return product_name;
            }

            public void setProduct_name(String product_name) {
                this.product_name = product_name;
            }

            public String getProduct_pic1() {
                return product_pic1;
            }

            public void setProduct_pic1(String product_pic1) {
                this.product_pic1 = product_pic1;
            }

            public String getBuy_numbers() {
                return buy_numbers;
            }

            public void setBuy_numbers(String buy_numbers) {
                this.buy_numbers = buy_numbers;
            }

            public String getPrice() {
                return price;
            }

            public void setPrice(String price) {
                this.price = price;
            }

            public String getReviews() {
                return reviews;
            }

            public void setReviews(String reviews) {
                this.reviews = reviews;
            }
        }
    }
}
